package org.dtrd.modules.device.mapper;

import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.device.entity.po.DtrdEntRdBioland;
import org.dtrd.modules.device.entity.po.DtrdEntRdDevice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xiao
 * @since 2022-01-11
 */
@Mapper
@Repository
public interface DtrdEntRdDeviceMapper extends BaseMapper<DtrdEntRdDevice> {

    /**
     * 查询绑定记录
     *
     * @param patientId
     * @param deviceSn
     * @param deviceBindState
     * @param deviceBrand
     * @param deviceCategory
     * @return
     */
    DtrdEntRdDevice selectRecordByCondition(@Param("patientId") Integer patientId, @Param("deviceSn") String deviceSn, @Param("deviceBindState") Integer deviceBindState, @Param("deviceBrand") Integer deviceBrand, @Param("deviceCategory") Integer deviceCategory);

    /**
     * 查询用户绑定的设备列表
     *
     * @param patientId
     * @param deviceBindState
     * @return
     */
    List<DtrdEntRdDevice> getBindDevice(@Param("patientId") Integer patientId, @Param("deviceBindState") Integer deviceBindState);
}
